<?php

/*
 * URL Routes
 * 
 */

return array(
    // Default
    //'<controller:\w+>/<id:\d+>' => '<controller>/view',
    //'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
    //'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
    // Authentication
    '<action:(login|logout)>' => 'app/<action>',
    // Application
    'error' => 'app/error',
    array('app/priceinquiry', 'pattern' => 'sms/prices/<senderNumber:\+{0,1}\d+>/<keyword:\w+>/<message:[a-zA-Z]+ [0-9]+>', 'verb' => 'GET'),
    // Temporary
    array('app/newcrop', 'pattern' => 'crops'),
    array('app/newprice', 'pattern' => 'price'),
    array('app/pricehistory/cid/<cid>', 'pattern' => 'crops/<cid:\d+>/prices'),
    // Crops Controller
    array('crops/list', 'pattern' => 'crops', 'verb' => 'GET'),
    array('crops/show', 'pattern' => 'crops/<id:\d+>', 'verb' => 'GET'),
    //array('crops/create', 'pattern' => 'crops', 'verb' => 'POST'),
    array('crops/edit', 'pattern' => 'crops/<id:\d+>', 'verb' => 'POST'),
    array('crops/price', 'pattern' => 'crops/<id:\d+>/price/<amount:\d+>', 'verb' => 'POST'),
    array('crops/destroy', 'pattern' => 'crops/<id:\d+>', 'verb' => 'POST'),
);
?>
